import  axios from "../../axios.js"

export default{
  //查询所有未禁用用户
  listUser(data,binding)
  {
    return axios({
      url:'/user-entity/listUser',
      method:'post',
      data,
      headers:{
        "binding": binding
      }
    })
  },
  //查询所有,带分页
  listPageUser(data,binding,pageNum,pageSize)
  {
    return axios({
      url:'/user-entity/listPageUser?'+'pageNum='+pageNum+'&'+'pageSize='+pageSize,
      method:'post',
      data,
      headers:{
        "binding": binding
      }
    })
  },
  //单个新增
  singleAdd(data,binding){
    return axios({
      url:'/user-entity/saveUser',
      method:'post',
      data,
      headers:{
        "binding": binding
      }
    })
  },
  //单个删除
  singleDetete(data,binding){
    return axios({
      url:'/user-entity/removeById',
      method:'post',
      data,
      headers:{
        "binding": binding
      }
    })
  },
  //单个编辑
  singleUpdate(data,binding){
    return axios({
      url:'/user-entity/updateById',
      method:'post',
      data,
      headers:{
        "binding": binding
      }
    })
  },
  //批量新增
  batchAdd(data,binding){
    return axios({
      url:'/user-entity/saveBatch',
      method:'post',
      data,
      headers:{
        "binding": binding
      }
    })
  },
  //批量编辑
  batchUpdate(data,binding){
    return axios({
      url:'/user-entity/updateBatchById',
      method:'post',
      data,
      headers:{
        "binding": binding
      }
    })
  },
  //批量删除
  batchDelete(data,binding){
    return axios({
      url:'/user-entity/removeByIds',
      method:'post',
      data,
      headers:{
        "binding": binding
      }
    })
  },
  //启用/禁用
  userIsBlank(data,binding){
    return axios({
      url:'/user-entity/userIsBlank',
      method:'post',
      data,
      headers:{
        "binding": binding
      }
    })
  },
};
